home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Resources / Online / Genesis / Install < prev    next >
Text File  |  1999-02-08  |  12KB  |  380 lines

  1. ; $VER: Genesis Installer v1.2 (archive) (08-Feb99)
  2. ;
  3. ; Copyright © 1998-99 Active Technologies
  4. ; http://www.active-net.co.uk
  5. ;
  6. ; Install script by Michael Neuweiler <dolphin@unizh.ch>
  7. ;
  8. ; Piracy and unlawful duplication of this package may result in
  9. ; criminal prosecution to the full extent of UK and European law.
  10.  
  11. (complete 0)
  12.  
  13. (set @app-name "Genesis")
  14. (set #error-msg "An unexpected error has occured. Installation aborted.")
  15.  
  16. (message "\n"
  17.          "Welcome to the " @app-name " installer.\n"
  18.          "\n"
  19.          "\n"
  20.          "© Active Technologies 1998-99\n"
  21.          "\n"
  22.          "http://www.active-net.co.uk\n"
  23.          "\n"
  24.          "\n"
  25.          "\n"
  26.          "Piracy and unlawful duplication of this package may result in "
  27.          "criminal prosecution to the full extent of UK and European law."
  28. )
  29.  
  30. ; Main component names & def pattern
  31. (set #Genesis-name   "Genesis v1.0.4")
  32. (set #sana2-name     "Sana II Network drivers")
  33. (set #mcc-name       "MUI Custom Classes")
  34. (set #cats-name      "Genesis Catalogs")
  35. (set #install-choice %1011)
  36.  
  37. ; main Genesis dirs
  38. (set #source-dir        "")
  39. (set #libs-dir          (tackon #source-dir "Libs"))
  40. (set #reg-dir           (tackon #source-dir "Register"))
  41. (set #devs-net-dir      (tackon #source-dir "Devs/Networks"))
  42. (set #mcc-dir           (tackon #source-dir "MUI/Libs/MUI"))
  43. (set #catalog-dir       (tackon #source-dir "Catalogs"))
  44. (set #Genesis-dir       "Genesis")
  45.  
  46. ; AmiTCP dirs/assigns
  47. (set #amitcp-name       "AmiTCP")
  48. (set #amitcp-assign     "AmiTCP:")
  49. (set #db-dir            (tackon #amitcp-assign "db"))
  50. (set #bin-dir           (tackon #amitcp-assign "bin"))
  51.  
  52. (welcome)
  53.  
  54. (onerror
  55.  (if old-atcp-directory
  56.      (makeassign #atcp-dir #old-amitcp-dir))
  57. )
  58.  
  59.  
  60.  
  61. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  62. (procedure check-system-version
  63.  
  64.   (transcript "checking system version")
  65.   (if (< (/ (getversion) 65536) 37)
  66.       (exit "\n\n" @app-name " requires Kickstart version 2.1 or above.\n\n\n"
  67.             "Installation aborted.\n\n"
  68.             (quiet)
  69.       )
  70.   )
  71. )
  72.  
  73.  
  74.  
  75. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  76. (procedure check-old-assign
  77.  
  78.    (transcript "Checking for already installed AmiTCP.")
  79.    (set #old-amitcp-dir
  80.       (if (exists #amitcp-assign (noreq))
  81.          (getassign #amitcp-name)
  82.          "")
  83.    )
  84.    (if #old-amitcp-dir
  85.       (transcript "Existing AmiTCP detected at directory " #old-amitcp-dir "."))
  86. )
  87.  
  88.  
  89.  
  90. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  91.  
  92. (procedure check-cpu-type
  93.  
  94.    (transcript "checking CPU type")
  95.    (set #cpu-type (database "cpu"))
  96.    (if (= #cpu-type "68060")
  97.       (set #cpu-choice 4)
  98.       (if (= #cpu-type "68040")
  99.          (set #cpu-choice 3)
  100.          (if (= #cpu-type "68030")
  101.             (set #cpu-choice 2)
  102.             (if (= #cpu-type "68020")
  103.                (set #cpu-choice 1)
  104.                (set #cpu-choice 0)
  105.             )
  106.          )
  107.       )
  108.    )
  109.  
  110.    (set #cpu-choice
  111.       (askchoice
  112.          (choices "68000" "68020" "68030" "68040" "68060")
  113.          (prompt "Please select which CPU " @app-name " will be running on.")
  114.          (help "Some parts of the " @app-name " package have been optimised for specific members of the 68000 processor family. "
  115.                "You should select the processor that " @app-name " will be running on so that the most appropriate programs will be used.")
  116.          (default #cpu-choice)
  117.       )
  118.    )
  119. )
  120.  
  121. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  122. (procedure ask-install
  123.  
  124.    (set #install-choice
  125.       (askoptions
  126.          (prompt "Please select which parts of the " @app-name " package you wish to install.")
  127.          (help "There are several parts to the " @app-name " package, some of which you may or may not wish to install. "
  128.                "Many of the parts are unique to this release, so if you have not installed any of these already you should select them all.")
  129.          (choices (cat #Genesis-name " (TCP/IP stack)")
  130.                   (cat #sana2-name " (required for ppp, slip)")
  131.                   (cat #cats-name " (Genesis catalog files)")
  132.                   (cat #mcc-name " (required)")
  133.          )
  134.          (default #install-choice)
  135.       )
  136.    )
  137.  
  138.    (if (= 0 #install-choice)
  139.       (exit "\n\n\n\nNo " @app-name " components have been selected.\n"
  140.             "Installation aborted.\n" (quiet))
  141.    )
  142. )
  143.  
  144.  
  145. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  146. (procedure ask-dst-dir
  147.  
  148.    (if (exists "Internet:" (noreq))
  149.       (set @default-dest "Internet:")
  150.       (if (exists "Work:" (noreq))
  151.          (set @default-dest "Work:")
  152.          (set @default-dest "SYS:")
  153.       )
  154.    )
  155.  
  156.    (set @default-dest
  157.       (askdir
  158.          (prompt "Please select where you would like " @app-name " installed. "
  159.                  "A drawer called '" #Genesis-dir "' will be created there.")
  160.          (help "Select where you would like " @app-name " installed."
  161.                "The installer will then create a drawer called '" #Genesis-dir "', "
  162.                "and copy the programs and documentation into it.")
  163.          (default @default-dest)
  164.          (newpath)
  165.       )
  166.    )
  167.    (if (NOT (= 2 (exists (tackon @default-dest #Genesis-dir))))
  168.       (makedir (tackon @default-dest #Genesis-dir)))
  169. )
  170.  
  171.  
  172. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  173. ;;
  174. ;; arguments:
  175. ;;
  176. ;; uus::commands - commands to add
  177. ;; uus::section  - section name
  178. ;;
  179. (procedure update-user-startup
  180.  
  181.    (set uus::complete (cat ";BEGIN " uus::section "\n"
  182.       uus::commands
  183.       ";END " uus::section "\n"))
  184.  
  185.    (set startup-changed 1)
  186.    (startup
  187.       uus::section
  188.       (command uus::commands)
  189.       (prompt "Installer will modify your S:User-Startup file. "
  190.               "Following lines will be appended to it:\n\n"
  191.               uus::complete)
  192.       (help "   Installer needs to make indicated modifications to your user startup file.\n"
  193.             "   You should make modifications later by hand if you skip this part.")
  194.    )
  195. )
  196.  
  197.  
  198. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  199. (procedure install-mcc
  200.  
  201.    (working "Checking MUI custom classes...")
  202.  
  203.      (if (= 2 (exists "MUI:Libs/MUI/" (noreq)))
  204.    (
  205.       (transcript "found existing MUI:libs/MUI dir")
  206.       (foreach "MUI/Libs/MUI" "#?"
  207.       (
  208.          (copylib
  209.             (prompt "Installing " @each-name)
  210.             (confirm)
  211.             (help @copylib-help)
  212.             (source (tackon "MUI/Libs/MUI" @each-name))
  213.             (dest "MUI:libs/mui/")
  214.             (optional "askuser" "force")
  215.          )
  216.       ))
  217.    ))
  218. )
  219.  
  220. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  221. (procedure install-catalogs
  222.  
  223.     (copyfiles
  224.         (prompt "Installing catalogs")
  225.         (help @copyfiles-help)
  226.         (source #catalog-dir)
  227.         (dest "LOCALE:Catalogs")
  228.         (choices "Deutsch" "Italiano")
  229.         (confirm)
  230.     )
  231. )
  232.  
  233.  
  234. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  235. (procedure install-reg
  236.  
  237.       (copyfiles
  238.          (source #source-dir)
  239.          (dest @default-dest)
  240.          (choices #reg-dir (cat #reg-dir ".info"))
  241.          (infos)
  242.       )
  243. )
  244.  
  245. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  246. (procedure install-devs
  247.  
  248.    (transcript "installing SanaII drivers")
  249.  
  250.    (if (NOT (exists "DEVS:Networks"))
  251.       (makedir "DEVS:Networks")
  252.    )
  253.  
  254.    (if (= 0 #cpu-choice) (set #appp-name "appp.device"))
  255.    (if (= 1 #cpu-choice) (set #appp-name "appp.device.020"))
  256.    (if (= 2 #cpu-choice) (set #appp-name "appp.device.030"))
  257.    (if (= 3 #cpu-choice) (set #appp-name "appp.device.030"))
  258.    (if (= 4 #cpu-choice) (set #appp-name "appp.device.030"))
  259.  
  260.  
  261.     (copylib (prompt "Updating appp.device.")
  262.             (help @copylib-help)
  263.             (confirm)
  264.             (source (tackon "Devs/Networks" #appp-name))
  265.             (dest "Devs:networks/")
  266.             (newname "appp.device")
  267.             (optional "askuser" "force")
  268.     )
  269.         (copylib
  270.          (prompt "Copying aslip.device to:\n\nDEVS:Networks")
  271.          (help @copylib-help)
  272.          (source (tackon "Devs/Networks" "aslip.device"))
  273.          (dest "DEVS:Networks")
  274.          (optional "force")
  275.          (confirm)
  276.        )
  277. )
  278.  
  279. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  280. (procedure install-Genesis
  281.  
  282.    (copyfiles
  283.      (prompt "Copy the Genesis icon")
  284.      (help @copyfiles-help)
  285.      (source #source-dir)
  286.      (choices "Genesis.info")
  287.      (dest @default-dest)
  288.      (optional "nofail")
  289.    )
  290.  
  291.    (makeassign #amitcp-name (expandpath (tackon @default-dest #Genesis-dir)))
  292.  
  293.    (if (NOT (= 2 (exists (tackon #amitcp-assign "devs"))))
  294.       (makedir (tackon #amitcp-assign "devs")))
  295.  
  296.    (copyfiles
  297.       (prompt "Copying Genesis files to:\n\n" @default-dest)
  298.       (help @copyfiles-help)
  299.       (source (tackon #source-dir #Genesis-dir))
  300.       (dest (tackon @default-dest #Genesis-dir))
  301.       (all)
  302.       (infos)
  303.       (optional "nofail"))
  304.  
  305.    (copyfiles
  306.       (prompt "Copying Genesis docs to:\n\n" (tackon @default-dest #Genesis-dir))
  307.       (help @copyfiles-help)
  308.       (source (tackon (tackon #source-dir #Genesis-dir) "Docs"))
  309.       (dest (tackon (tackon @default-dest #Genesis-dir) "Docs"))
  310.       (all)
  311.       (infos)
  312.       (optional "nofail"))
  313.  
  314.    (if (NOT (= 2 (exists (tackon #amitcp-assign "log"))))
  315.       (makedir (tackon #amitcp-assign "log")))
  316.    (if (NOT (= 1 (exists (tackon #amitcp-assign "log/wtmp"))))
  317.       (textfile (dest (tackon #amitcp-assign "log/wtmp"))))
  318.    (protect (tackon #bin-dir "netstat") "+s +e")
  319.    (protect (tackon #bin-dir "SynClock") "+s +e")
  320.    (protect (tackon #bin-dir "startnet") "+s +e")
  321.    (protect (tackon #bin-dir "stopnet") "+s +e")
  322.  
  323.    (set uus::commands (cat "Assign " #amitcp-assign " \"" (expandpath (tackon @default-dest #Genesis-dir)) "\"\n"
  324.                            "path " (tackon #amitcp-assign "bin") " add\n"
  325.                            "Assign APIPE: Exists > NIL:\n"
  326.                            "IF Warn\n"
  327.                            "  Mount APIPE: from " (tackon #amitcp-assign "devs/APipe-Mountlist") "\n"
  328.                            "EndIf\n"))
  329.    (set uus::section "AmiTCP/IP")
  330.    (update-user-startup)
  331.  
  332.    (foreach #libs-dir "#?"
  333.       (copylib
  334.          (prompt "Copying " @each-name " to:\n\n" "LIBS:")
  335.          (help "You should copy all libraries if you want Genesis to work correctly.")
  336.          (source (tackon #libs-dir @each-name))
  337.          (dest "LIBS:")
  338.          (optional "askuser" "force")
  339.          (confirm)
  340.       )
  341.    )
  342. )
  343.  
  344.  
  345.  
  346. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  347. ;;;
  348. ;;; Installatation sequence
  349. ;;;
  350.  
  351. (complete 00) (transcript "On making " app-name ".")
  352. (complete 02) (check-system-version)
  353. (complete 04) (check-old-assign)
  354. (complete 06) (check-cpu-type)
  355.  
  356. (complete 10) (ask-install)
  357. (complete 15) (ask-dst-dir)
  358. (complete 30) (if (IN #install-choice 00) (install-Genesis))
  359. (complete 50) (if (IN #install-choice 01) (install-devs))
  360. (complete 60) (if (IN #install-choice 02) (install-catalogs))
  361. (complete 70) (if (IN #install-choice 03) (install-mcc))
  362. (complete 80) (if (IN #install-choice 00) (install-reg))
  363. (complete 90)
  364. (if (IN #install-choice 00)
  365. (
  366.    (if (= 1 (askbool
  367.       (prompt "\nWould you like to launch Genesis Wizard to configure the just installed Genesis ?\n")
  368.       (help "The Genesis Wizard will help you to configure Genesis for the first time with"
  369.             "little effort. We advise you to use the Wizard if you are unfamiliar with setting up a network.")
  370.       (default 1)))
  371.    (
  372.       (run "run AmiTCP:GenesisWizard")
  373.    ))
  374. ))
  375.  
  376. (complete 100)
  377.  
  378. ;; EOF
  379. ;;
  380.